package com.upcode.weighing.vo.req.org;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;

import io.swagger.annotations.ApiModelProperty;

/**
 * 用户机构迁移请求类
 *
 * @author zhangteng
 * @since 2021-01-25
 */
public class OrgMigrationReqVo implements Serializable {
    @ApiModelProperty(value = "用户id")
    private String id;

    @ApiModelProperty(value = "机构编码")
    private String orgCode;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    /**
     * 组织机构校验
     */
    public String checkFileds() {
        // 机构名称
        if (StringUtils.isBlank(this.getId())) {
            return "用户id为空";
        }

        // 机构编码
        if (StringUtils.isBlank(this.getOrgCode())) {
            return "机构编码为空";
        }

        return StringUtils.EMPTY;
    }
}
